package com.iemp.web.controller.base;

import com.iemp.config.consts.ApiConsts;
import org.springframework.web.bind.annotation.*;

public interface IBaseController<E> {

    @GetMapping(ApiConsts.SELECT_BY_ID)
    E selectById(@PathVariable Integer id);

    @DeleteMapping(ApiConsts.DELETE_BY_ID)
    Integer deleteById(@PathVariable Integer id);

    @PostMapping(ApiConsts.SAVE)
    Integer insertSelective(@RequestBody E entity);

    @PostMapping(ApiConsts.UPDATE_BY_ID)
    Integer updateByIdSelective(@RequestBody E entity);

}
